import React from 'react';
import {NavLink, BrowserRouter, Route, Routes,Navigate} from 'react-router-dom'
import About from "./pages/About";
import Home from "./pages/Home";

export default function AppRouterDemo() {
    return (
        <div>
            <BrowserRouter>
                <NavLink to="/about">About<br/></NavLink>
                <NavLink to="/home">Home</NavLink>
                <Routes>
                    <Route path="/about" element={<About/>}/>
                    <Route path="/home" element={<Home/>}/>
                    <Route path="/" element={<Navigate to="/about"/>}/>
                </Routes>
            </BrowserRouter>
        </div>
    );
}
